package com.sgl.user.controller;


import com.spring.cloud.user.dto.User;
import com.spring.cloud.user.service.UserService;
import org.springframework.web.bind.annotation.*;

/**
 * Created by Administrator on 2017/7/14.
 */
@RestController
public class RefactorUserController implements UserService {

    @Override
    public String hello(@RequestParam("name") String name) {
        return "hello " + name;
    }

    @Override
    public User hello(@RequestHeader String name, @RequestHeader Integer age) {
        return new User(name, age);
    }

    @Override
    public String hello(@RequestBody User user) {
        return "hello " + user.getName() + ", " + user.getAge();
    }
}
